#!/usr/bin/env jsrun


var writeln=function(x){return write( (x ? x+"\n" : "\n") )};

var s = tcpsocket(51234, function(x){
	writeln("HTTP/1.1 200 OK");
	writeln("Content-Type:text/html; charset=UTF-8");
	writeln();
	writeln("<h1>privet</h1>\n");
	
/*
	writeln("<<EOT
HTTP/1.1 200 OK
Content-Type:text/html; charset=UTF-8

<h1>privet</h1>
EOT");
*/

/*
	var i, out=[];	
	
	var f=function(n){ write("<h3>privet"+n+"</h3>\n")};
	
	for(i=0;i<10;++i){
		f(i);
		sleep(1000);
	}
*/	
//	write(out.join("\n"));
	

});



sleep(1000*1000);